package com.ruoyi.erp.controller;

import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.erp.domain.JumboPlatesMain;
import com.ruoyi.erp.service.JumboPlatesMainService;
import com.ruoyi.system.api.domain.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.ruoyi.common.core.utils.PageUtils.startPage;

@RestController
public class TestController extends BaseController
{
    @Autowired
    JumboPlatesMainService jumboPlatesMainService;
    @Value("${mybatis.typeAliasesPackage}")
    private String typeAliasesPackage;

    @GetMapping("info")
    public String get()
    {
        return typeAliasesPackage;
    }


    @GetMapping("getList")
    public TableDataInfo getJumboPlatesMainList()
    {
        startPage();
        List<JumboPlatesMain> list = jumboPlatesMainService.selectJumboPlatesMainList(new JumboPlatesMain());
        //for(JumboPlatesMain bean:list)
        //{
        //    System.out.println(bean.toString());
        //}
        //return String.valueOf(list.size());
        return getDataTable(list);
    }

   /* @RequiresPermissions("system:role:list")
    @GetMapping("/list")
    public TableDataInfo list(SysRole role)
    {
        startPage();
        List<SysRole> list = roleService.selectRoleList(role);
        return getDataTable(list);
    }*/
}